package com.gk.panda.apis.entity.largeScreen.Enum;

/**
 * @Description:
 * @author: wangchao
 * @date: 2022/12/2 14:48
 * @version: 1.0
 **/
public enum PatrolEnum {

    DAILY("日常巡护","DAILY"),
    TRANSECT("样线巡护","TRANSECT"),
    OTHER("其它","OTHER"),
    ;


    private final String name;
    private final String type;

    PatrolEnum(String name, String type) {
        this.name = name;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public static String getNameByType(String type) {
        PatrolEnum[] values = PatrolEnum.values();
        for (PatrolEnum tmp : values){
            if (tmp.getType().equals(type)){
                return tmp.getName();
            }
        }
        return null;
    }

    public String getType() {
        return type;
    }
}
